package com.tbit.uqbike.webmanager.dao.core;

import com.tbit.uqbike.object.pojo.FeeAppeal;
import com.tbit.uqbike.object.pojo.dto.CommonDTO;
import com.tbit.uqbike.object.pojo.vo.FeeAppealInfoVO;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @Author HZW
 * @ClassName OrderFeeAppealDao
 * @Description
 * @date 2021/12/20 11:23
 * @Version 1.0
 */
public interface OrderFeeAppealDao {
    /**
     * 获取申诉订单详情
     */
    List<FeeAppeal> getInfo(FeeAppeal feeAppeal);

    /**
     * 修改订单状态
     */
    Integer updateState(FeeAppeal feeAppeal);

    /**
     * 根据处理时间查询申诉总金额
     *
     * @param map 地图
     * @return {@link CommonDTO}
     */
    CommonDTO getTotalMoney(Map<String, Object> map);
    /**
     * @description: 大数据量导出分页查询
     * @author: mo.shanyong
     * @date: 2024/11/28 17:00
     * @param: feeAppeal
     * @return: java.util.List<com.tbit.uqbike.object.pojo.FeeAppeal>
     */
    List<FeeAppeal> getBigExcelInfo(FeeAppeal feeAppeal);

    /**
     * @description: 查询总数
     * @author: mo.shanyong
     * @date: 2024/11/28 17:00
     * @param: feeAppeal
     * @return: int
     */
    int getBigExcelCount(FeeAppeal feeAppeal);
    /**
     * @description: 查找在查询区间内最大的id
     * @author: mo.shanyong
     * @date: 2024/11/28 17:01
     * @param: feeAppeal
     * @return: int
     */
    Integer getBigExcelMaxAppealId(FeeAppeal feeAppeal);

    /**
     * @description:查找在查询区间内最小的id
     * @author: mo.shanyong
     * @date: 2024/11/28 17:02
     * @param: feeAppeal
     * @return: int
     */
    Integer getBigExcelMinAppealId(FeeAppeal feeAppeal);

    FeeAppeal queryById(@Param("id") Integer id);


    /**
     * 添加
     * @param entities
     */
    void insertBatch(@Param("entities") List<FeeAppeal> entities);

    List<String> getOrderNos();

    int deleteByOrderNos(@Param("orderNos") List<String> orderNos);

    /**
     * 根据用户id查询申诉统计信息
     *
     * @param userId 用户id
     */
    FeeAppealInfoVO getAppealStats(@Param("userId") Integer userId);


    List<FeeAppeal> selectList(@Param("orderNos")List<String> orderNos);

    FeeAppeal getOrderNo(@Param("orderNO") String orderId);

    /**
     * @description: 根据用户id统计数量
     * @author: mo.shanyong
     * @date: 2025/5/19 11:02
     * @param: userPhone
     * @return: int
     */
    int countByUserId(Integer userId);
}
